import request from '@/utils/request'

// 查询请假记录列表
export function listLeaveapplication(query) {
  return request({
    url: '/system/leaveapplication/list',
    method: 'get',
    params: query
  })
}

// 查询请假记录详细
export function getLeaveapplication(id) {
  return request({
    url: '/system/leaveapplication/' + id,
    method: 'get'
  })
}

// 新增请假记录
export function addLeaveapplication(data) {
  return request({
    url: '/system/leaveapplication',
    method: 'post',
    data: data
  })
}

// 修改请假记录
export function updateLeaveapplication(data) {
  return request({
    url: '/system/leaveapplication',
    method: 'put',
    data: data
  })
}

// 删除请假记录
export function delLeaveapplication(id) {
  return request({
    url: '/system/leaveapplication/' + id,
    method: 'delete'
  })
}
